﻿@model CampWeek5__Book_Project_.Models.BookVM
@{
    ViewBag.Title = "CreateBook";
}

<h2>Add a Book</h2>

<form class="well container" method="post">
    @Html.HiddenFor(x => x.Id)
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                @Html.LabelFor(x => x.Title)
                @Html.TextBoxFor(x => x.Title, new { @class = "form-control", placeholder = "Enter Book Title" })
                <br />
                @Html.LabelFor(x => x.ISBN)
                @Html.TextBoxFor(x => x.ISBN, new { @class = "form-control", placeholder = "Enter ISBN" })
                <br />
                @Html.LabelFor(x => x.AuthorId)
                @Html.TextBoxFor(x => x.AuthorId, new { @class = "form-control", placeholder = "Enter Author Id #" })
                <br />
                @Html.LabelFor(x => x.PubDate)
             @*/*   <input class="form-control" name="PubDate" placeholder="Enter First Publication Date mm/dd/yyyy" />*@
                @Html.TextBoxFor(x => x.PubDate, new {@class = "form-control", placeholder="Enter First Publication Date mm/dd/yyyy"  })
                <br />
                @Html.LabelFor(x => x.Tags)
                <input class="form-control" name="Tags" placeholder="Enter Genre(s) seperated by commas" value="@string.Join(", ", Model.Tags)" />
                <br />
                @Html.LabelFor(x => x.Summary)
                @Html.TextBoxFor(x => x.Summary, new { @class = "form-control", placeholder = "Summary goes here" })
                <br />
                @Html.LabelFor(x => x.BookImg)
                @Html.TextBoxFor(x => x.BookImg, new { @class = "form-control", placeholder = "paste url for book cover image here" })
            </div>
        </div>
    </div>

    <div>
        <button type="submit" class="btn btn-primary">Submit</button>
    </div>

    @Html.ValidationSummary("", new { style = "color:red;" })
</form>